Getting Information About AWT Contexts and Frames
JManager provides a number of functions that return information about an AWT context or a frame. For example, since multiple applets can appear onscreen, if a user clicks in a window that corresponds to a frame, you may need to find out what applet or AWT context the frame belongs to.The
JMCountAWTContextFrames
function (page 66) counts the number of frames associated with an AWT context.The
JMGetAWTContextFrame
function (page 66) lets you find a particular frame (as indexed by theJMCountAWTContextFrames
function) associated with an AWT context.The
JMGetFrameContext
function (page 92) finds the AWT context associated with a frame.The
JMGetFrameViewer
function (page 82) lets you determine the frame associated with an applet.The
JMGetViewerFrame
function (page 82) finds an applet's parent frame, which is the frame created when the applet is created.If you want to set or read client-specific data associated with an AWT context, you can do so using the functions
JMSetAWTContextData
(page 64) andJMGetAWTContextData
(page 63).If you want to read or set client-specific data associated with a particular frame, you can do so using the functions
JMGetFrameData
(page 83) andJMSetFrameData
(page 84). Typically you can store the window record as client data to make it easy to find a window corresponding to a frame. See Listing 1-7 (page 16) and Listing 1-8 (page 17) for an example.